#ifndef DMANAGECLASSDLG_H
#define DMANAGECLASSDLG_H

#include <QDialog>
#include "ui_dmanageclassdlg.h"

// manipulate with data localy so if user press cancel we wont 
// modify data 
// Manage modification localy and commite it only if user press OK

class DMethodEntity;
class DVariableEntity;
class DClassEntity;
class DVariableTableModel;

class DManageClassDlg : public QDialog
{
	Q_OBJECT

public:
	DManageClassDlg(DClassEntity* pClass, QWidget *parent = 0);
	~DManageClassDlg();

private:
	Ui::DManageClassDlg ui;

	QList<DVariableEntity*> m_tempVariables;
	QList<DMethodEntity*> m_tempMethods;
	DClassEntity* m_pClass;

	DVariableTableModel* m_pVarModel;
private slots:
	void onAddMethod();
	void onModifyMethod();
	void onRemoveMethod();

	void onAddVariable();
	void onModifyVariable();
	void onRemoveVariable();
};

#endif // DMANAGECLASSDLG_H
